/**
 * Created by 2017 on 2017/9/25.
 */
var minimist = require('minimist');
var projectUrl = '';

var argv = require('minimist')(process.argv.slice(2));

var gulp = require('gulp');
var del = require('del');  //删除
// var runSequence = require('run-sequence');
// var browserSync = require('browser-sync').create();   // 静态服务器
var jshint = require('gulp-jshint');     //检查js
var uglify = require('gulp-uglify');  //引入 通过UglifyJS来压缩JS文件
// var sass = require('gulp-sass');  //引入 编译sass文件
var sourcemaps = require('gulp-sourcemaps');
// var autoprefixer = require('gulp-autoprefixer');
var minifyCSS = require('gulp-minify-css');  //压缩css
// var browserify = require('browserify');
// var source = require('vinyl-source-stream');
// var buffer = require('vinyl-buffer');
// var include = require('gulp-html-tag-include');   //html引入
// var htmlmin = require('gulp-htmlmin');   //html压缩
var concat = require('gulp-concat');                  // 多个文件合并为一个；
// var rev = require('gulp-rev');                         // 对文件名加MD5后缀
// var revCollector = require('gulp-rev-collector');       // 路径替换
var babel = require('gulp-babel');                   // es6转换器babel
// Cleaning up generated files automatically
// gulp.task('clean:dist', function() {
//     return del.sync('dist');   //同步删除
// });

gulp.task('default',function(){   
    gulp.src('src/*.js')       // 路径问题：gulpfile.js为路径的起点。此路径表示js文件下的所有js文件。
    // .pipe(concat('maptalks-3d.js'))//合并成的js文件名称
    // .pipe(babel({presets:['es2015']}))
    .pipe(uglify())            //压缩
    .pipe(gulp.dest('build'));    
});


